﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using knfLibrary;

namespace LibreriaNuovaExcel
{
    public class excelHelper
    {
        private string _reporter;
        private string _aliasProduct;
        private int _productCode;
        private string _kindOfReport;
        private List<int> _listaAnni = new List<int>();
        private bool _isAveraged;
        private knfDataContext _db = new knfDataContext();
        private List<string> kPartnersImport = new List<string>();
        private List<string> kPartnersExport = new List<string>();



        public excelHelper(string Reporter, string AliasProdotto, string KindOfReport, List<int> ListaAnni, bool isAveraged)
        {
            _reporter = Reporter;
            _aliasProduct = AliasProdotto;
            _kindOfReport = KindOfReport;
            _listaAnni = ListaAnni;
            _isAveraged = isAveraged;

            switch (_aliasProduct)
            {
                case "Glass mineral wool":
                    _productCode = 70193900;
                    break;
                case "Rock mineral wool":
                    _productCode = 68061000;
                    break;
                case "Wood Wool":
                    _productCode = 68080000;
                    break;
            }
        }


        public string CreaReport(string connectionString, string filePath, string imageFilePath)
        {

            //var import = from p in _db.Tabella_Totalis where ( p.Reporter == _reporter 
            //             && p.Flow == "IMPORT" && p.Product == _aliasProduct &&
            //                p.Year ==  2008 && p.Indicator == _kindOfReport)
            //               group p by p.Partner into Total= 





   //         Dim tar = (From p In _db.Tabella_Totalis Where p.Reporter = Country _
   //And p.Flow = "IMPORT" And p.Product = kAliasProduct And _
   //(p.Year = SuperStringa) And p.Indicator = ReportType Group By p.Partner
   //Into Total = Sum(p.Total) Order By Total Descending)




            return string.Empty;
        }


    }
}
